#include <stdio.h>
/*int jicheng(int x)
{
	if (x == 0)
		return 1;
	else
		return x * jicheng(x - 1);
}*/
int jicheng1(int x)
{
	int i = 1;
	int mul = 1;
	for (i = 1; i <= x; i++)
	{
		 mul *= i;
	}
	return mul;

}

int main()
{
	int n = 0;
	scanf_s("%d", &n);
	int r = jicheng1(n);
	printf("%d", r);
	return 0;
}